<admintpl file="header" />
<style>
    .uploadList ul li{
        list-style: none;
    }
    .uploadList ul li img{
        max-height: 90px;
    }
    .productList{
      padding: 0px;
      margin-left: 180px;
      width: 80%;
      margin-top: 30px;
    }
    .productList li {
        list-style: none;
        height: 40px;
    }
</style>
<script type="text/javascript" src="__PUBLIC__/uploadify/jquery.uploadify.min.js"></script>
<link rel="stylesheet" href="__PUBLIC__/uploadify/uploadify.css">
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li ><a href="{:U('Promotion/index')}"> 活动列表 </a></li>
        <li class="active"><a href="{:U('Promotion/add')}">添加活动</a></li>
    </ul>
    <form action="{:U('Promotion/add')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
        <fieldset style="overflow: hidden;">
             <div class="control-group">
                 <!--<label class="control-label" > 抢购时间段 </label>-->
                 <div class="controls">
                     <span > 抢购时间段 </span>
                     <input type="text" name="start_time" class="js-datetime" value="{$formget.start_time|default=''}"  autocomplete="off"> -
                     <input type="text" class="js-datetime" name="end_time" value="{$formget.end_time|default=''}" autocomplete="off">
                 </div>
             </div>
            <div>
                <h3 style="margin-left: 180px;"> 商品列表 </h3>
            </div>
            <table class="productList">
                <tr style="height: 50px;">
                    <th>ID</th>
                    <th>商品名</th>
                    <th>商品主图</th>
                    <th>商品价格</th>
                    <th>商品状态</th>
                    <th>操作</th>
                </tr>
                <foreach name="list" item ="v">
                    <tr style="text-align: center">
                        <td> {$v['id']} </td>
                        <td> {$v['title']} </td>
                        <td><img src="{$v['image']}" style="height:30px;display: block;margin: 0 auto;margin-top: 5px;" alt=""> </td>
                        <td> {$v['price_plus']} </td>
                        <td> {$v['status']==1?"正常":"已下架"} </td>
                        <td>
                            <input type="checkbox" name="id[]" value="{$v['id']}">
                        </td>
                    </tr>
                </foreach>
            </table>
        </fieldset>
        <div class="form-actions">
            <button class="btn btn-primary js-ajax-submit" type="submit">{:L("ADD")}</button>
            <a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
        </div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    var editorcontent = new baidu.editor.ui.Editor();
    editorcontent.render('content');
</script>
</body>
</html>